{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Survival Analysis\n",
    "\n",
    "This notebook presents code and exercises from Think Bayes, second edition.\n",
    "\n",
    "Copyright 2016 Allen B. Downey\n",
    "\n",
    "MIT License: https://opensource.org/licenses/MIT"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from __future__ import print_function, division\n",
    "\n",
    "% matplotlib inline\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "\n",
    "import math\n",
    "import numpy as np\n",
    "\n",
    "from thinkbayes2 import Pmf, Cdf, Suite, Joint\n",
    "import thinkplot"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The Weibull distribution\n",
    "\n",
    "The Weibull distribution is often used in survival analysis because it models the distribution of lifetimes for manufactured products, at least over some parts of the range.\n",
    "\n",
    "The following functions evaluate its PDF and CDF."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def EvalWeibullPdf(x, lam, k):\n",
    "    \"\"\"Computes the Weibull PDF.\n",
    "\n",
    "    x: value\n",
    "    lam: parameter lambda in events per unit time\n",
    "    k: parameter\n",
    "\n",
    "    returns: float probability density\n",
    "    \"\"\"\n",
    "    arg = (x / lam)\n",
    "    return k / lam * arg**(k-1) * np.exp(-arg**k)\n",
    "\n",
    "def EvalWeibullCdf(x, lam, k):\n",
    "    \"\"\"Evaluates CDF of the Weibull distribution.\"\"\"\n",
    "    arg = (x / lam)\n",
    "    return 1 - np.exp(-arg**k)\n",
    "\n",
    "def MakeWeibullPmf(lam, k, high, n=200):\n",
    "    \"\"\"Makes a PMF discrete approx to a Weibull distribution.\n",
    "\n",
    "    lam: parameter lambda in events per unit time\n",
    "    k: parameter\n",
    "    high: upper bound\n",
    "    n: number of values in the Pmf\n",
    "\n",
    "    returns: normalized Pmf\n",
    "    \"\"\"\n",
    "    xs = np.linspace(0, high, n)\n",
    "    ps = EvalWeibullPdf(xs, lam, k)\n",
    "    return Pmf(dict(zip(xs, ps)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "SciPy also provides functions to evaluate the Weibull distribution, which I'll use to check my implementation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.33093633846922332"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from scipy.stats import weibull_min\n",
    "\n",
    "lam = 2\n",
    "k = 1.5\n",
    "x = 0.5\n",
    "\n",
    "weibull_min.pdf(x, k, scale=lam)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.33093633846922332"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "EvalWeibullPdf(x, lam, k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.1175030974154046"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weibull_min.cdf(x, k, scale=lam)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.11750309741540454"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "EvalWeibullCdf(x, lam, k)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And here's what the PDF looks like, for these parameters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBOR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wpAE3O+c+MrOewM+BQeEwHnTOreion1mkIWrmEmk755x7g9AX/E/D\niWQMcBtwSXhl3mrgTufct4ES59xk59zdNfdHPGs88GVgLHA3MNI5NxV4ltAmThDa2Oon4fOfJeD7\ns0hsUM1EJDpmElqJd3V4AcE04FD4vaaWv1/tnDsCYGa7Ca0xB6EaSl74+GrgvPBzIbRseoZzrqQd\n4xdpFSUTkegw4LfOue+28r6zEcfVEeVqav9/NWBqeCdRkZigZi6RlmvNhlpvA581s14AZpZjZjV9\nHOXhfWbO5bkQqq084N1sNqGV94u0OyUTkZZLN7O9ZrYv/Off08gOdOFtD/4FWGRm6wklgH7ht58B\nNpjZ72oub+TzGjv/AHCRma03s03Afefyw4i0Jw0NFhGRNlPNRERE2kzJRERE2kzJRERE2kzJRERE\n2kzJRERE2kzJRERE2kzJRERE2kzJRERE2uz/A00f4OrL9mK+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb922231d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pmf = MakeWeibullPmf(lam, k, high=10)\n",
    "thinkplot.Pdf(pmf)\n",
    "thinkplot.Config(xlabel='Lifetime',\n",
    "                 ylabel='PMF')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can use np.random.weibull to generate random values from a Weibull distribution with given parameters.\n",
    "\n",
    "To check that it is correct, I generate a large sample and compare its CDF to the analytic CDF."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl0XOWZ5/HvU6Wq0l7aypJ3wOBA6EBiggNZlaS7cdIJ\nMEmngcwkgTQMk0D2mYbJdJ9W93RPJ5mTSYdgFicOkLAbS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CvOOd+6pwb45y7hOjf\nh/nOuW96XZdXYr9yN5rZ+NhTnyc7TzS/B1xnZrlmZkS/h6w7scy5v83OAG6PPf4W0OugcEjWlrnQ\nhVBD8dmpxsw+AfxnYI2ZrSL669VPnXOzva1MUsD3gafMLABsIwsvBnTOvW1mLwCrgNbYf6d4W9XQ\nMrOngWqg3MzeA/4R+Bkwzcy+DTQAf9PrcXQRk4hI5tEJVRGRDKRwFxHJQAp3EZEMpHAXEclACncR\nkQykcBcgV+2IAAAAFElEQVQRyUAKdxGRDKRwFxHJQP8fSkdS3MAIzsEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8fdb2d50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def SampleWeibull(lam, k, n=1):\n",
    "    return np.random.weibull(k, size=n) * lam\n",
    "\n",
    "data = SampleWeibull(lam, k, 10000)\n",
    "cdf = Cdf(data)\n",
    "model = pmf.MakeCdf()\n",
    "thinkplot.Cdfs([cdf, model])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "**Exercise:** Write a class called `LightBulb` that inherits from `Suite` and `Joint` and provides a `Likelihood` function that takes an observed lifespan as data and a tuple, `(lam, k)`, as a hypothesis.  It should return a likelihood proportional to the probability of the observed lifespan in a Weibull distribution with the given parameters.\n",
    "\n",
    "Test your method by creating a `LightBulb` object with an appropriate prior and update it with a random sample from a Weibull distribution.\n",
    "\n",
    "Plot the posterior distributions of `lam` and `k`.  As the sample size increases, does the posterior distribution converge on the values of `lam` and `k` used to generate the sample?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "class LightBulb(Suite, Joint):\n",
    "    \n",
    "    def Likelihood(self, data, hypo):\n",
    "        lam, k = hypo\n",
    "        if lam == 0:\n",
    "            return 0\n",
    "        x = data\n",
    "        like = EvalWeibullPdf(x, lam, k)\n",
    "        return like"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "from itertools import product\n",
    "\n",
    "lams = np.linspace(0, 5, 101)\n",
    "ks = np.linspace(0, 5, 101)\n",
    "\n",
    "suite = LightBulb(product(lams, ks))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.5677896093212706e-09"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "datum = SampleWeibull(lam, k, 10)\n",
    "lam = 2\n",
    "k = 1.5\n",
    "suite.UpdateSet(datum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.3583976257450225"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lfWd6PHPNytZSEiAJGQhAbKAbGGRRUSiYoVai3W6\nqNPR9s4duW2ZOu0stp07I/Z2prV3xk4dpyPdZrQdB721VWwVESGKIBCWAAkJCUsCYQlbAtnI+rt/\nnMOTJ8csB7I8Z/m+X6+8eH5Pfs853xNy8j3PbxVjDEoppYJTiNMBKKWUco4mAaWUCmKaBJRSKohp\nElBKqSCmSUAppYKYJgGllApiXiUBEVkhIuUiUiEiT/ZR5zkRqRSRYhHJd5+LFJFdIrJfRA6JyFO2\n+k+JSI2I7HN/rRial6SUUspbYQNVEJEQ4HngbuAMUCQibxhjym11VgJTjDE5IrIQeAFYZIxpFZE7\njTHNIh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sbMcjoep4hICpBijCkWkVhgL7AqiH8voo0xzSISCmwHvm6MGfBNH6hE5BvAPCDO\nGPNpp+NxiogcB+YZY3qfkerBV+8ErAlqxph24Poks6BkjPkQ8Oo/NJAZY85dX47EGNOIa4RZmrNR\nOccY0+w+jMTVv+d7n+hGiIikA58Efu50LD5AuIG/7b6aBPqafKYUACKSBeQDu5yNxDnu5o/9wDng\nXWNMkdMxOehHwF8TxInQxgDvikiRiPzZQJV9NQko1Sd3U9BvgCfcdwRByRjTZYyZA6QDC0XkFqdj\ncoKI3AfUuu8ShZubrBpIlhhj5uK6M/qauzm5T76aBE4DE23ldPc5FeREJAxXAviVMabXuSXBxhhz\nFdgKrHA6FocsAT7tbgv/b+BOEXnJ4ZgcY4w56/73AvA7Pr7MTw++mgSsCWoiEoFrkllQ9/ijn3Cu\n+yVw2BjzY6cDcZKIjBORePdxFHAPPRd1DBrGmO8YYyYaYybj+luxxRjzqNNxOUFEot13yohIDPAJ\noKS/a3wyCRhjOoHrk8xKgfW2SWZBR0ReBnYAuSJyUkS+7HRMThCRJcAfA3e5h7/tc+9XEYwmAFtF\npBhXv8g7xpi3HI5JOS8Z+NDdV7QTeNMYs6m/C3xyiKhSSqmR4ZN3AkoppUaGJgGllApimgSUUiqI\naRJQSqkgpklAKaWCmCYBpZQKYpoElFIqiGkSUEqpIPb/AWKhRK6P94HwAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8fd39fd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_lam = suite.Marginal(0)\n",
    "thinkplot.Pdf(pmf_lam)\n",
    "pmf_lam.Mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.2969100506973927"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
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ct1mdlGMztoZg1m9mTY9YTFzL5jZu1mtjfsWsJmZlVm\n9qqZ7TOz98zsy2HXFBYzKzOzHWa2O/61+FrYNYXNzIrMbJeZbQ+7ljCZWbOZvRv/3vj5kG3D7NGP\n5IaqfGdm9wKXgGfd/fbh2uczM5sLzHX3PWY2GXgH2FSI3xcAZjbR3a+YWTHwBvBldx/yP3Y+M7Pf\nBz4MTHX3z4RdT1jM7CjwYXfvGq5t2D36xM1Y7t4N9N9QVXDc/XVg2H+wQuDup/qX0HD3S8ABYvdk\nFCR3vxLfLCN2Xa1gx1vNrAp4GPh22LVEgJFmhocd9De70UoEADOrAdYAO4Zumb/iQxW7gVPAK+6+\nM+yaQvQN4KsU8A+7AAdeMbOdZvY7QzUMO+hFbio+bPMc8JV4z74guXufu68FqoC7zGxV2DWFwcw+\nBbTHf9szbvHGzDxyj7uvI/Ybzpfiw7+DCjvo24CFgf2q+DEpcGZWQizk/9rdfxx2PVHg7heA14CN\nYdcSknuAz8THpr8P3Gdmz4ZcU2jc/WT87w7ghwyxvEzYQZ+4GcvMSondUFXIV9LVS0n6LrDf3b8Z\ndiFhMrNZZlYe354AfIIxXhQwKtz9j9x9obsvJpYVr7r7Y2HXFQYzmxj/jRczmwR8Enj/Zu1DDXp3\n7wX6b6jaB2wr1BuqzOzvgDeBWjM7bmafD7umsJjZPcDngPvjU8d2xZ9rUIjmAa+Z2R5i1ylecvcX\nQq5JwlcBvB6/dvM28Ly7v3yzxrphSkQkz4U9dCMiIlmmoBcRyXMKehGRPKegFxHJcwp6EZE8p6AX\nEclzCnoRkTynoBcRyXP/H8Yjw91rIwTXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8fd3f550>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_k = suite.Marginal(1)\n",
    "thinkplot.Pdf(pmf_k)\n",
    "pmf_k.Mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEACAYAAACatzzfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecJVd55//Pqaob+3aO092Ts8IoJ0ZILRQQwWCiCCZ5\nwWYNC4v9Y9kf2Eh4vex61zZ4YY29i9GSba/IUcjACCSUUB6NNHmmp6dzuDnUraqzf9S93T0zHW5r\netQ1muf9ejV9e1S3+nTR/a2nzjl1SmmtEUIIEVzGSjdACCHEwiSohRAi4CSohRAi4CSohRAi4CSo\nhRAi4CSohRAi4KxaNlJKHQFSgAeUtdZXnslGCSGEmFFTUOMHdJ/WeupMNkYIIcSpau36UEvYVggh\nxDKqNXw1cI9S6hGl1PvOZIOEEEKcqNauj51a6yGlVDt+YD+rtb7vTDZMCCGEr6ag1loPVT6PKaW+\nA1wJnBDUSilZNEQIIZZIa60W22bRrg+lVFwplai8rgNuAXbP8w3lQ2tuv/32FW9DED7kOMixkGOx\n8EetaqmoO4HvVCpmC/i61vpnNX8HIYQQp2XRoNZaHwYufgHaIoQQYg4y5e4M6OvrW+kmBIIchxly\nLGbIsVg6tZR+kgV3pJRern0JIcS5QCmFXo7BRCGEECtLgloIIQJOgloIIQJOgloIIQJOgloIIQJO\ngloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloI\nIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJO\ngloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloIIQJOgloI\nIQKu5qBWShlKqceUUt8/kw0SQghxoqVU1B8G9pyphgghhJhbTUGtlOoFXgl88cw2RwghxMlqrag/\nA3wU0GewLUIIIeZgLbaBUupVwIjW+gmlVB+g5tv2jjvumH7d19dHX1/f6bdQCCFeJHbt2sWuXbuW\n/D6l9cJFslLq08DvAQ4QA+qBb2ut33nSdnqxfQkhhJihlEJrPW/xO73dUsJVKXU98Cda69fM8d8k\nqIUQYglqDWqZRy2EEAG3pIp6wR1JRS2EEEsiFbUQQrxISFALIUTASVALIUTASVALIUTASVALIUTA\nSVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVAL\nIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTA\nSVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVALIUTASVAL\nIUTASVALIUTAWYttoJSKAL8CwpXt79Jaf+pMN0wIIYRPaa0X30ipuNY6r5QygfuBD2mtHz5pG13L\nvoQQQviUUmit1WLb1dT1obXOV15G8KtqSWQhhHiB1BTUSilDKfU4MAzco7V+5Mw2SwghRFWtFbWn\ntb4E6AWuUkqdd2abJYQQomrRwcTZtNZppdQvgVuBPSf/9zvuuGP6dV9fH319fafZPCGEePHYtWsX\nu3btWvL7Fh1MVEq1AWWtdUopFQPuBv6r1vrHJ20ng4lCCLEEtQ4m1lJRrwK+rJQy8LtK/vnkkBZC\nCHHm1DQ9r6YdSUUthBBLsqzT84QQQqwcCWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWoh\nhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4\nCWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWoh\nhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4CWohhAg4\nCWohhAi4RYNaKdWrlPqFUuoZpdTTSqkPvRANE0II4VNa64U3UKoL6NJaP6GUSgCPAq/VWj930nZ6\nsX0JIYSYoZRCa60W285abAOt9T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YCq31fcCiB/xcoLUe1lo/UXmdBZ7lHJ57r7XOV15G8MeF\nztn+RqVUL/BK4Isr3ZYAUNSYwacb1HIzjFiQUmodcDHw0Mq2ZOVULvUfB4aBe7TWj6x0m1bQZ4CP\ncg6frGbRwD1KqUeUUu9baEO54UWcMZVuj7uAD1cq63OS1trTWl8C9AJXKaXOW+k2rQSl1KuAkcrV\nlqp8nMt2aq0vxb/C+ECl+3ROpxvUx4E1s77urfybOMcppSz8kP6q1vp7K92eINBap4FfAreudFtW\nyE7gNZW+2W8CNyilvrLCbVoxWuuhyucx4Dv4XclzOt2gfgTYpJRaq5QKA28BzuWRXKkSZnwJ2KO1\n/tuVbshKUkq1KaUaK69jwM3AOTmoqrX+uNZ6jdZ6A35W/EJr/c6VbtdKUErFK1ecKKXqgFuA3fNt\nf1pBrbV2gerNMM8A/3Su3gyjlPoG8Btgi1KqXyn1npVu00pRSu0E3g68rDL16DGl1LlaRa4CfqmU\negK/n/5urfWPV7hNYuV1AvdVxi4eBH6gtf7ZfBvLDS9CCBFwMpgohBABJ0EthBABJ0EthBABJ0Et\nhBABJ0EthBABJ0EthBABJ0EthBABJ0EthBAB9/8A2Ve+cZ7q7pkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f73f310>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "thinkplot.Contour(suite)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "**Exercise:** Now suppose that instead of observing a lifespan, `k`, you observe a lightbulb that has operated for 1 year and is still working.  Write another version of `LightBulb` that takes data in this form and performs an update. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "class LightBulb2(Suite, Joint):\n",
    "    \n",
    "    def Likelihood(self, data, hypo):\n",
    "        lam, k = hypo\n",
    "        if lam == 0:\n",
    "            return 0\n",
    "        x = data\n",
    "        like = 1 - EvalWeibullCdf(x, lam, k)\n",
    "        return like"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "from itertools import product\n",
    "\n",
    "lams = np.linspace(0, 10, 101)\n",
    "ks = np.linspace(0, 10, 101)\n",
    "\n",
    "suite = LightBulb2(product(lams, ks))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.83566549505291599"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "suite.Update(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.6166427208116056"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEACAYAAACznAEdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtwXOWZ5/Hv0xdJliXZ8h1bvoCNDTEQQ7h4AiQihMEm\nkzibybCQzJLAbOKaxEw2u5uCJLODqa3dCkxlEwizE6g4WciGJRmSDU4NAYcQzYZJAA/gwYCNbUxs\nWbblq6y71N169o9utVptSd26Hqn796nq6nNOv2/r6S44P7/nPee0uTsiIiKhoAsQEZHJQYEgIiKA\nAkFERFIUCCIiAigQREQkRYEgIiJAnoFgZuvMbLeZ7TGzuwZp86CZ7TWzHWZ2acb2LWbWaGavZ7W/\n38x2pdr/1MyqRvdRRERkNHIGgpmFgIeAG4HVwK1mdkFWm/XAcnc/H9gI/H3Gyz9I9c22DVjt7muA\nvcBXR/QJRERkTOQzQrg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nKY2QLgWK4OkzUQ0hfDpc4WuIXkhWzF6vvAW+7+QNCF\nBMndv+b2SCI8AAAAv0lEQVTuS9z9PJL/TTzv7rcFXVcQUocC6s1sZWrT9RTvRPtBYK2ZlVnyfvfX\nU5wT7Nmj5t6Lf2GIi38zTcofyMlxQVtRMbOrgU8DO83sNZLDvq+5+zPBViaTwF8BPzKzKLCf1AWh\nxcbdXzazJ4HXgFjq+ZFgq5pYZvY4UAvMNrODwD3AN4B/GM7Fv7owTUREgMl7yEhERCaYAkFERAAF\ngoiIpCgQREQEUCCIiEiKAkFERAAFgoiIpCgQREQEgP8PVS3YLX++YKkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f839b50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_lam = suite.Marginal(0)\n",
    "thinkplot.Pdf(pmf_lam)\n",
    "pmf_lam.Mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.2481865102083747"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEACAYAAACznAEdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl0nPV97/H3d7RbtuUFvMqWjXezmc2YJAQlJI1Nmrjb\npSa3hdIlbhu3Oek9KWlu78HuvefeJLdbOLSX0JCFnCQkoRScFAiEoBYCOAZjNttY3mRJtuV9k7WO\nvvePeTQaDZJmtIyfWT6vc3TmeZ75/R59R8d+PvM8v2cxd0dERCQSdgEiIpIdFAgiIgIoEEREJKBA\nEBERQIEgIiIBBYKIiABpBoKZrTazXWa228zuGaTNfWZWb2bbzeyahOUPmVmLmb2Z1P63zOxtM4ua\n2bWj+xgiI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b2IzPbGfz7uDHsmsJiZp8z\ns7fN7E0z+66ZlYZd08VkZg+ZWYuZvZmwbLKZPWNm75rZT82sKtV6sjIQ0rkYroB0A3/h7pcDNwGf\nKeC/Ra9p55pzAAACTElEQVTPAjvCLiILfBV40t2XAVcDAx2OzXtmNgv4M2LjkFcROxS+LtyqLrpv\nEtteJvoC8DN3XwL8HPirVCvJykAgvYvhCoK7H3H37cH0eWL/6ZOvAykYwdXttwFfD7uWMJnZROBm\nd/8mgLt3u/vZkMsKUxFQaWbFwDjgUMj1XFTu/iKQfFLOWuDbwfS3gV9LtZ5sDYR0LoYrOGY2D1gB\nbAm3klD1Xt1e6INf84HjZvbN4PDZg8H1PQXH3Q8BfwccJHb6+ml3/1m4VWWFae7eArEvlsC0VB2y\nNRAkiZmNBx4FPhvsKRQcM/s40BLsMRmFfWZaMXAt8E/ufi2xa3q+EG5J4TCzScS+DdcAs4DxZvap\ncKvKSim/RGVrIDQDcxPmey9cK0jBbvCjwHfc/Ymw6wnR+4FPmtk+4PvAh8zs4ZBrCksTsVu/vBrM\nP0osIArRR4B97n7S3aPAY8D7Qq4pG7QE95TDzGYAR1O0z9pAiF8MF5wtsI7YxW+F6hvADnf/atiF\nhMndv+juc939MmL/Jn7u7neGXVcYgkMBjWa2OFh0K4U70H4QWGVm5WZmxP4WhTjAnrzXvBn4vWD6\nLiDll8lM3ctoVIZxQVveM7P3A/8VeMvMXie22/dFd3863MokC/w58F0zKwH2EVwQWmjc/Zdm9ijw\nOtAVvD4YblUXl5l9D6gFpprZQeBe4EvAj8zs94k9YuD2lOvRhWkiIgLZe8hIREQuMgWCiIgACgQR\nEQkoEEREBFAgiIhIQIEgIiKAAkFERAIKBBERAeD/A0dghPMngUHIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8fd0b750>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_k = suite.Marginal(1)\n",
    "thinkplot.Pdf(pmf_k)\n",
    "pmf_k.Mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Now let's put it all together.  Suppose you have 15 lightbulbs installed at different times over a 10 year period.  When you observe them, some have died and some are still working.  Write a version of `LightBulb` that takes data in the form of a `(flag, x)` tuple, where:\n",
    "\n",
    "1. If `flag` is `eq`, it means that `x` is the actual lifespan of a bulb that has died.\n",
    "2. If `flag` is `gt`, it means that `x` is the current age of a bulb that is still working, so it is a lower bound on the lifespan.\n",
    "\n",
    "To help you test, I will generate some fake data.\n",
    "\n",
    "First, I'll generate a Pandas DataFrame with random start times and lifespans.  The columns are:\n",
    "\n",
    "`start`: time when the bulb was installed\n",
    "\n",
    "`lifespan`: lifespan of the bulb in years\n",
    "\n",
    "`end`: time when bulb died or will die\n",
    "\n",
    "`age_t`: age of the bulb at t=10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>lifespan</th>\n",
       "      <th>start</th>\n",
       "      <th>end</th>\n",
       "      <th>age_t</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2.669393</td>\n",
       "      <td>3.884926</td>\n",
       "      <td>6.554320</td>\n",
       "      <td>6.115074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4.439592</td>\n",
       "      <td>1.024761</td>\n",
       "      <td>5.464353</td>\n",
       "      <td>8.975239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.013455</td>\n",
       "      <td>2.801937</td>\n",
       "      <td>3.815392</td>\n",
       "      <td>7.198063</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.632849</td>\n",
       "      <td>8.844007</td>\n",
       "      <td>10.476856</td>\n",
       "      <td>1.155993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.774843</td>\n",
       "      <td>8.325410</td>\n",
       "      <td>9.100254</td>\n",
       "      <td>1.674590</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   lifespan     start        end     age_t\n",
       "0  2.669393  3.884926   6.554320  6.115074\n",
       "1  4.439592  1.024761   5.464353  8.975239\n",
       "2  1.013455  2.801937   3.815392  7.198063\n",
       "3  1.632849  8.844007  10.476856  1.155993\n",
       "4  0.774843  8.325410   9.100254  1.674590"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "lam = 2\n",
    "k = 1.5\n",
    "n = 15\n",
    "t_end = 10\n",
    "starts = np.random.uniform(0, t_end, n)\n",
    "lifespans = SampleWeibull(lam, k, n)\n",
    "\n",
    "df = pd.DataFrame({'start': starts, 'lifespan': lifespans})\n",
    "df['end'] = df.start + df.lifespan\n",
    "df['age_t'] = t_end - df.start\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now I'll process the DataFrame to generate data in the form we want for the update."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('eq', 2.6693934023350288)\n",
      "('eq', 4.4395922794570097)\n",
      "('eq', 1.0134550944499816)\n",
      "('gt', 1.1559931554468044)\n",
      "('eq', 0.7748433201074556)\n",
      "('eq', 0.58523684453682523)\n",
      "('eq', 1.5050346559516292)\n",
      "('eq', 0.0043263460781409529)\n",
      "('eq', 3.1183238430930049)\n",
      "('eq', 2.5497343435244648)\n",
      "('eq', 1.426995199412439)\n",
      "('eq', 2.8969617422395997)\n",
      "('eq', 1.2143990874080592)\n",
      "('gt', 0.28161850035970559)\n",
      "('eq', 1.4219175345313229)\n"
     ]
    }
   ],
   "source": [
    "data = []\n",
    "for i, row in df.iterrows():\n",
    "    if row.end < t_end:\n",
    "        data.append(('eq', row.lifespan))\n",
    "    else:\n",
    "        data.append(('gt', row.age_t))\n",
    "        \n",
    "for pair in data:\n",
    "    print(pair)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "class LightBulb3(Suite, Joint):\n",
    "    \n",
    "    def Likelihood(self, data, hypo):\n",
    "        lam, k = hypo\n",
    "        if lam == 0:\n",
    "            return 0\n",
    "        flag, x = data\n",
    "        if flag == 'eq':\n",
    "            like = EvalWeibullPdf(x, lam, k)\n",
    "        elif flag == 'gt':\n",
    "            like = 1 - EvalWeibullCdf(x, lam, k)\n",
    "        else:\n",
    "            raise ValueError('Invalid data')\n",
    "        return like"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "from itertools import product\n",
    "\n",
    "lams = np.linspace(0, 10, 101)\n",
    "ks = np.linspace(0, 10, 101)\n",
    "\n",
    "suite = LightBulb3(product(lams, ks))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.7937515916258046e-12"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "suite.UpdateSet(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.2717545445867739"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt4XHd95/H3V3f5Ivl+k+S7YzuG3HFMQojSAIlDwdCH\nbmPYpoRu8RZMWOglbHefB3u7u4WnS4E8aUnSpikpF1NSKKZ1Q0ipCEmJ4yQ2SWw5vtuSbMuSLcmS\nLMu6fPePGY2OJrqMpBmdGc3n9TzG55z5nTNfKeY7v/me3+93zN0REZHskBN2ACIiMnGU9EVEsoiS\nvohIFlHSFxHJIkr6IiJZRElfRCSLJJT0zexuMztoZofM7MEh2jxkZofNbJ+ZXRc4/lkzez3654Fk\nBS4iIqM3YtI3sxzgYeAuYB2w2czWxLXZCKxw91XAFuCR6PF1wO8CNwHXAb9uZsuT+hOIiEjCEunp\nrwcOu/tJd+8CdgCb4tpsAp4EcPfdQKmZzQfWArvdvdPde4DngN9IWvQiIjIqiST9MqAmsF8bPTZc\nm7rosTeA28xspplNAe4BKsYeroiIjEdeKi/u7gfN7MvAT4E2YC/Qk8r3FBGRoSWS9OuAxYH98uix\n+DYVg7Vx9yeAJwDM7P8w8BtBjJlpESARkVFydxtN+0TKO3uAlWa2xMwKgHuBnXFtdgL3AZjZBqDZ\n3euj+3Ojfy8GPgx8Z5jg9cedL37xi6HHkA5/9HvQ70K/i+H/jMWIPX137zGzrcAzRD4kHnf3ajPb\nEnnZH3P3XWZ2j5kdAdqB+wOX+EczmwV0AZ9y94tjilRERMYtoZq+uz8NrI479mjc/tYhzn33mKMT\nEZGk0ozcNFRZWRl2CGlBv4d++l300+9ifGysdaFkMzNPl1hERDKBmeEpuJErIiKThJK+iEgWUdIX\nEckiSvoiIllESV9EJIso6YuIZBElfRGRLKKkLyKSRZT0RUSyiJK+iEgWUdIXEckiSvoiIllEST/N\naNE5EUmllD4jV0bnu7v28IOf7mVZ2WzefdMq3nXjSm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CxybaWbPmNmbZvYTMxtxZcJQk3508tbDwF3A\nOmCzma0JM6YQdQOfd/d1wDuBT2fx76LPZ4EDI7aa/L4O7HL3tcC1QFaWSM1sEfAZ4AZ3v4ZIefre\ncKOaUE8QyZVBXwCedffVwM+A/z7SRcLu6ccmfrl7F9A3eSvruPvZvqUr3L2NyP+xy8KNKjxmVg7c\nA/xN2LGEycxKgNvc/QkAd+9294shhxWmXGCqmeUBU4jM9M8K7v480BR3eBPwzej2N4EPjXSdsJP+\nUJO6spqZLQWuA3aHG0movgr8EYxpDtVksgxoNLMnoqWux8wsKx/j5u6nga8Ap4A6IqMEnw03qtDN\nc/d6iHQcgXkjnRB20pc4ZjYNeAr4bLTHn3XM7P1AffSbjzHGyX6TRB5wA/CX7n4DcInIV/qsY2Yz\niPRslwCLgGlm9tFwo0o7I3aSwk76dcDiwH559FhWin5lfQr4e3f/UdjxhOhW4INmdgz4LnCHmT0Z\nckxhqQVq3P3l6P5TRD4EstF7gGPufsHde4AfALeEHFPY6qPrnGFmC4BzI50QdtKPTfyK3oW/l8hE\nr2z1t8ABd/962IGEyd3/xN0Xu/tyIv8mfubu94UdVxiiX91rzOyq6KE7yd6b26eADWZWZJGFb+4k\n+25qx3/z3Ql8PLr9O8CIncVQl5PU5K1+ZnYr8DHgdTPbS+Rr2p+4+9PhRiZp4AHg22aWDxwjOvkx\n27j7S2b2FLAX6Ir+/Vi4UU0cM/sOUAnMNrNTwBeBLwHfN7NPACeB/zTidTQ5S0Qke4Rd3hERkQmk\npC8ikkWU9EVEsoiSvohIFlHSFxHJIkr6IiJZRElfRCSLKOmLiGSR/w8GrAMyhPCyHgAAAABJRU5E\nrkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f900f50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_lam = suite.Marginal(0)\n",
    "thinkplot.Pdf(pmf_lam)\n",
    "pmf_lam.Mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.2410798895283741"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEACAYAAABfxaZOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2QXfV93/H3Z5+0Wmm1kkAI0BMGgbCJHUpiTOIkXo8z\nA1ZSK5NkWpG0NG46o5kaw8RtBtd/1NL0YZLJZFx7yMTQYDd4nBKHurGmoZRk8NotboWwjQEjLGEi\noQdLQhKr1e5qpX349o/7sOdeVrt3d++959w9n9eMxueee865P12Lz/72e36/31FEYGZm+dCWdgPM\nzKx5HPpmZjni0DczyxGHvplZjjj0zcxyxKFvZpYjNYW+pHskvSbpoKSHZnh/m6TvSBqT9KkZ3m+T\n9D1Je+vRaDMzW5g5Q19SG/AwcDdwG3CvpFurDjsLfBL4oytc5kHg1UW008zM6qCWnv6dwKGIOBIR\n48ATwI7kARFxJiK+C0xUnyxpI7Ad+LM6tNfMzBahltDfABxNvD5W3FerzwG/D3jqr5lZyhp6I1fS\nrwCnIuJFQMU/ZmaWko4ajjkObE683ljcV4sPAh+TtB1YDvRKejwi7qs+UJJ/EzAzm6eImFdnupae\n/n5gq6QtkrqAncBso3DKDYiIz0TE5oi4sXjeszMFfuL4TP05ePgkv/7An5b/fPnrzzXlcz/72c+m\n/nfPwh9/D/4u/F3M/mch5uzpR8SkpPuBZyj8kHgsIg5I2lV4Ox6VtB54AegFpiQ9CLwnIoYX1KqM\n2PeDv694ffDI6ZRaYmZWH7WUd4iIp4FtVfseSWyfAjbNcY1vAd9aQBtT8/zLhyte//joW0xMTNLR\n0Z5Og8zMFskzcq/g2Km3OX56sGLfxMQkh4+fbfhn9/f3N/wzWoG/h2n+Lqb5u1gcLbQuVG+SI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NzPLkf8PYl9lQ9EHuHgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f656a10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "pmf_k = suite.Marginal(1)\n",
    "thinkplot.Pdf(pmf_k)\n",
    "pmf_k.Mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "**Exercise:** Suppose you install a light bulb and then you don't check on it for a year, but when you come back, you find that it has burned out.  Extend `LightBulb` to handle this kind of data, too."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "class LightBulb4(Suite, Joint):\n",
    "    \n",
    "    def Likelihood(self, data, hypo):\n",
    "        lam, k = hypo\n",
    "        if lam == 0:\n",
    "            return 0\n",
    "        flag, x = data\n",
    "        if flag == 'eq':\n",
    "            like = EvalWeibullPdf(x, lam, k)\n",
    "        elif flag == 'gt':\n",
    "            like = 1 - EvalWeibullCdf(x, lam, k)\n",
    "        elif flag == 'lt':\n",
    "            like = EvalWeibullCdf(x, lam, k)\n",
    "        else:\n",
    "            raise ValueError('Invalid data')\n",
    "        return like"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## Prediction\n",
    "\n",
    "**Exercise:** Suppose we know that, for a particular kind of lightbulb in a particular location, the distribution of lifespans is well modeled by a Weibull distribution with `lam=2` and `k=1.5`.  If we install `n=100` lightbulbs and come back one year later, what is the distribution of `c`, the number of lightbulbs that have burned out?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.29781149867344037"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "# The probability that any given bulb has burned out comes from the CDF of the distribution\n",
    "p = EvalWeibullCdf(1, lam, k)\n",
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3WmQVPd57/HvMyszDDMM27AjFgkkLAlxbcBLrIkUW4Ad\ncX2dRcQ3ilW5CVURsSvJTcnJiyuoSlLJiyxSKTcSZUWxEjtyrMQ2ToiCdZWRrSRGSICEBIhBYh1g\nmGHYZthmee6LXuZ0a5aG6e7Tp/v3qaJ8zul/dz99POqn/7u5OyIiUprKwg5ARETCoyQgIlLClARE\nREqYkoCISAlTEhARKWFKAiIiJSyjJGBmq83sgJkdNLPHhinzpJm1mtkeM1sWuP5VM9sb//eVbAUu\nIiJjN2oSMLMy4CngAWApsN7MlqSVWQMsdPdbgQ3A0/HrS4FfBT4KLAM+b2YLsvoJRETkpmVSE1gB\ntLr7UXfvBV4A1qWVWQc8D+DuO4AGM2sCbgd2uPs1d+8HfgT8j6xFLyIiY5JJEpgFHA+cn4hfG6lM\nW/zaO8BPmVmjmdUCa4E5Nx+uiIhkU0UuX9zdD5jZnwA/BLqB3UB/Lt9TREQyl0kSaAPmBs5nx6+l\nl5kzVBl3fw54DsDM/pDUGkOSmWkRIxGRG+TuNpbnZ9IctBNYZGbzzKwKeAjYmlZmK/AwgJmtAs67\ne3v8fGr8f+cCXwC+Ndwbubv+ufP444+HHkMh/NN90L3QvRj5XzaMWhNw934z2whsJ5Y0nnX3/Wa2\nIfawb3H3bWa21swOAT3AI4GX+EczmwT0Ar/h7hezErmIiIxZRn0C7v4SsDjt2jNp5xuHee6nbzo6\nERHJKc0YLkDNzc1hh1AQdB8G6V4M0r3ILstWu9JYmZkXSiwiIlFgZvgYO4ZzOkRUouVM1y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yJwbSvw5fjxrwDfT39SsXH333f3ue6+gNjfwSvu/svADyi9e9EOHDez\n2+KX7gfepQT/Log1A60ys3HxTs77iQ0cKKV7YaTWjof77FuBh+Kjp+YDi4DXR33xsOcJWGy/gScY\nnEz2x6EGlEdm9kngR8BeYlU6B36f2P9x/0Asqx8FfsHdz4cVZ76Z2b3A77j7g2Y2iRK8F2Z2N7EO\n8krgA2ITMMspzXvxOLEfBr3AbuB/ARMogXthZt8CmoHJQDvwOPA94DsM8dnN7PeAXyV2r77q7ttH\nfY+wk4CIiIQn7OYgEREJkZKAiEgJUxIQESlhSgIiIiVMSUBEpIQpCYiIlDAlARGREqYkICJSwv4/\n9Vv7ZX4P1OAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f5441d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "# The number of bulbs that have burned out is distributed Binom(n, p)\n",
    "n = 100\n",
    "from thinkbayes2 import MakeBinomialPmf\n",
    "\n",
    "pmf_c = MakeBinomialPmf(n, p)\n",
    "thinkplot.Pdf(pmf_c)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Exercise:** Now suppose that `lam` and `k` are not known precisely, but we have a `LightBulb` object that represents the joint posterior distribution of the parameters after seeing some data.  Compute the posterior predictive distribution for `c`, the number of bulbs burned out after one year."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Solution\n",
    "\n",
    "n = 100\n",
    "t_return = 1\n",
    "\n",
    "metapmf = Pmf()\n",
    "for (lam, k), prob in suite.Items():\n",
    "    p = EvalWeibullCdf(t_return, lam, k)\n",
    "    pmf = MakeBinomialPmf(n, p)\n",
    "    metapmf[pmf] = prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
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CXAsR+RWQDwwB\nqoEngFeB39HGuYvIt4Ev479Wj6rq+k4/I1aTgzHGGO/EarWSMcYYD1lyMMYY04olB2OMMa1YcjDG\nGNOKJQdjjDGtWHIwxhjTiiUHY4wxrVhyMMYY08r/D4+Z1znHFMtYAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fdb8f53c8d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Solution\n",
    "\n",
    "from thinkbayes2 import MakeMixture\n",
    "\n",
    "mix = MakeMixture(metapmf)\n",
    "thinkplot.Pdf(mix)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
